package com.hongyue.Object1;

import java.util.Objects;

public class ShouJi {
    private String pinPai;
    private String yanSe;
    private double JiaGe;

    @Override
    public String toString() {
        return "ShouJi{" +
                "pinPai='" + pinPai + '\'' +
                ", yanSe='" + yanSe + '\'' +
                ", JiaGe=" + JiaGe +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ShouJi shouJi = (ShouJi) o;
        return Double.compare(shouJi.JiaGe, JiaGe) == 0 &&
                Objects.equals(pinPai, shouJi.pinPai) &&
                Objects.equals(yanSe, shouJi.yanSe);
    }

    @Override
    public int hashCode() {
        return Objects.hash(pinPai, yanSe, JiaGe);
    }

    public ShouJi(String pinPai, String yanSe, double jiaGe) {
        this.pinPai = pinPai;
        this.yanSe = yanSe;
        JiaGe = jiaGe;
    }

    public ShouJi() {
    }

    public String getPinPai() {
        return pinPai;
    }

    public void setPinPai(String pinPai) {
        this.pinPai = pinPai;
    }

    public String getYanSe() {
        return yanSe;
    }

    public void setYanSe(String yanSe) {
        this.yanSe = yanSe;
    }

    public double getJiaGe() {
        return JiaGe;
    }

    public void setJiaGe(double jiaGe) {
        JiaGe = jiaGe;
    }
}
